﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using SpLocalizer.Common;
using Microsoft.Practices.Unity;

namespace SpLocalizer.ContentSourceProviders.XPath
{
    public class  XPathContentLocalizationTask : BaseTranslationTask
    {

        #region Constants
            private const string Property_XPath = "XPath";
            private const string Property_Position = "Position";

        #endregion

        #region Properties

            /// <summary>
            /// XPath query 
            /// </summary>
            public string XPath
            {
                get { return this.GetPropertyValue(Property_XPath); }
                set { this.SetPropertyValue(Property_XPath, value); }
            }

            /// <summary>
            /// Position 
            /// </summary>
            public string Position
            {
                get { return this.GetPropertyValue(Property_Position); }
                set { this.SetPropertyValue(Property_Position, value); }
            }

        #endregion


                /// <summary>
        /// Constructor without parameters should be public for unity injection
        /// </summary>
           public XPathContentLocalizationTask() { }


           internal XPathContentLocalizationTask(CultureInfo FromLanguage, CultureInfo ToLanguage,
                                                string XPath, int Position)
               : base(FromLanguage, ToLanguage)
           {
               this.XPath = XPath;
               this.Position = Position.ToString();
           }
    }
}
